/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package BoardGameLanguage.impl;

import BoardGameLanguage.Board;
import BoardGameLanguage.BoardGameLanguagePackage;
import BoardGameLanguage.Field;
import BoardGameLanguage.Figure;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EcoreUtil;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Field</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getBoard <em>Board</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getFigure <em>Figure</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getRight <em>Right</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getLeft <em>Left</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getAbove <em>Above</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getBelow <em>Below</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getRow <em>Row</em>}</li>
 *   <li>{@link BoardGameLanguage.impl.FieldImpl#getColumn <em>Column</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class FieldImpl extends EObjectImpl implements Field {
	/**
	 * The cached value of the '{@link #getFigure() <em>Figure</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFigure()
	 * @generated
	 * @ordered
	 */
	protected Figure figure;

	/**
	 * The cached value of the '{@link #getRight() <em>Right</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRight()
	 * @generated
	 * @ordered
	 */
	protected Field right;

	/**
	 * The cached value of the '{@link #getLeft() <em>Left</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLeft()
	 * @generated
	 * @ordered
	 */
	protected Field left;

	/**
	 * The cached value of the '{@link #getAbove() <em>Above</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAbove()
	 * @generated
	 * @ordered
	 */
	protected Field above;

	/**
	 * The cached value of the '{@link #getBelow() <em>Below</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBelow()
	 * @generated
	 * @ordered
	 */
	protected Field below;

	/**
	 * The default value of the '{@link #getRow() <em>Row</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRow()
	 * @generated
	 * @ordered
	 */
	protected static final int ROW_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getRow() <em>Row</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRow()
	 * @generated
	 * @ordered
	 */
	protected int row = ROW_EDEFAULT;

	/**
	 * The default value of the '{@link #getColumn() <em>Column</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getColumn()
	 * @generated
	 * @ordered
	 */
	protected static final int COLUMN_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getColumn()
	 * @generated
	 * @ordered
	 */
	protected int column = COLUMN_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected FieldImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return BoardGameLanguagePackage.Literals.FIELD;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Board getBoard() {
		if (eContainerFeatureID() != BoardGameLanguagePackage.FIELD__BOARD)
			return null;
		return (Board) eContainer();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetBoard(Board newBoard,
			NotificationChain msgs) {
		msgs = eBasicSetContainer((InternalEObject) newBoard,
				BoardGameLanguagePackage.FIELD__BOARD, msgs);
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBoard(Board newBoard) {
		if (newBoard != eInternalContainer()
				|| (eContainerFeatureID() != BoardGameLanguagePackage.FIELD__BOARD && newBoard != null)) {
			if (EcoreUtil.isAncestor(this, newBoard))
				throw new IllegalArgumentException(
						"Recursive containment not allowed for " + toString());
			NotificationChain msgs = null;
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			if (newBoard != null)
				msgs = ((InternalEObject) newBoard).eInverseAdd(this,
						BoardGameLanguagePackage.BOARD__FIELDS, Board.class,
						msgs);
			msgs = basicSetBoard(newBoard, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__BOARD, newBoard, newBoard));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Figure getFigure() {
		if (figure != null && figure.eIsProxy()) {
			InternalEObject oldFigure = (InternalEObject) figure;
			figure = (Figure) eResolveProxy(oldFigure);
			if (figure != oldFigure) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
							BoardGameLanguagePackage.FIELD__FIGURE, oldFigure,
							figure));
			}
		}
		return figure;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Figure basicGetFigure() {
		return figure;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetFigure(Figure newFigure,
			NotificationChain msgs) {
		Figure oldFigure = figure;
		figure = newFigure;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this,
					Notification.SET, BoardGameLanguagePackage.FIELD__FIGURE,
					oldFigure, newFigure);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFigure(Figure newFigure) {
		if (newFigure != figure) {
			NotificationChain msgs = null;
			if (figure != null)
				msgs = ((InternalEObject) figure).eInverseRemove(this,
						BoardGameLanguagePackage.FIGURE__FIELD, Figure.class,
						msgs);
			if (newFigure != null)
				msgs = ((InternalEObject) newFigure).eInverseAdd(this,
						BoardGameLanguagePackage.FIGURE__FIELD, Figure.class,
						msgs);
			msgs = basicSetFigure(newFigure, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__FIGURE, newFigure,
					newFigure));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field getRight() {
		if (right != null && right.eIsProxy()) {
			InternalEObject oldRight = (InternalEObject) right;
			right = (Field) eResolveProxy(oldRight);
			if (right != oldRight) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
							BoardGameLanguagePackage.FIELD__RIGHT, oldRight,
							right));
			}
		}
		return right;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field basicGetRight() {
		return right;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetRight(Field newRight,
			NotificationChain msgs) {
		Field oldRight = right;
		right = newRight;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this,
					Notification.SET, BoardGameLanguagePackage.FIELD__RIGHT,
					oldRight, newRight);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRight(Field newRight) {
		if (newRight != right) {
			NotificationChain msgs = null;
			if (right != null)
				msgs = ((InternalEObject) right)
						.eInverseRemove(this,
								BoardGameLanguagePackage.FIELD__LEFT,
								Field.class, msgs);
			if (newRight != null)
				msgs = ((InternalEObject) newRight)
						.eInverseAdd(this,
								BoardGameLanguagePackage.FIELD__LEFT,
								Field.class, msgs);
			msgs = basicSetRight(newRight, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__RIGHT, newRight, newRight));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field getLeft() {
		if (left != null && left.eIsProxy()) {
			InternalEObject oldLeft = (InternalEObject) left;
			left = (Field) eResolveProxy(oldLeft);
			if (left != oldLeft) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
							BoardGameLanguagePackage.FIELD__LEFT, oldLeft, left));
			}
		}
		return left;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field basicGetLeft() {
		return left;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetLeft(Field newLeft, NotificationChain msgs) {
		Field oldLeft = left;
		left = newLeft;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this,
					Notification.SET, BoardGameLanguagePackage.FIELD__LEFT,
					oldLeft, newLeft);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLeft(Field newLeft) {
		if (newLeft != left) {
			NotificationChain msgs = null;
			if (left != null)
				msgs = ((InternalEObject) left).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__RIGHT, Field.class,
						msgs);
			if (newLeft != null)
				msgs = ((InternalEObject) newLeft).eInverseAdd(this,
						BoardGameLanguagePackage.FIELD__RIGHT, Field.class,
						msgs);
			msgs = basicSetLeft(newLeft, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__LEFT, newLeft, newLeft));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field getAbove() {
		if (above != null && above.eIsProxy()) {
			InternalEObject oldAbove = (InternalEObject) above;
			above = (Field) eResolveProxy(oldAbove);
			if (above != oldAbove) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
							BoardGameLanguagePackage.FIELD__ABOVE, oldAbove,
							above));
			}
		}
		return above;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field basicGetAbove() {
		return above;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetAbove(Field newAbove,
			NotificationChain msgs) {
		Field oldAbove = above;
		above = newAbove;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this,
					Notification.SET, BoardGameLanguagePackage.FIELD__ABOVE,
					oldAbove, newAbove);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAbove(Field newAbove) {
		if (newAbove != above) {
			NotificationChain msgs = null;
			if (above != null)
				msgs = ((InternalEObject) above).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__BELOW, Field.class,
						msgs);
			if (newAbove != null)
				msgs = ((InternalEObject) newAbove).eInverseAdd(this,
						BoardGameLanguagePackage.FIELD__BELOW, Field.class,
						msgs);
			msgs = basicSetAbove(newAbove, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__ABOVE, newAbove, newAbove));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field getBelow() {
		if (below != null && below.eIsProxy()) {
			InternalEObject oldBelow = (InternalEObject) below;
			below = (Field) eResolveProxy(oldBelow);
			if (below != oldBelow) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
							BoardGameLanguagePackage.FIELD__BELOW, oldBelow,
							below));
			}
		}
		return below;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field basicGetBelow() {
		return below;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetBelow(Field newBelow,
			NotificationChain msgs) {
		Field oldBelow = below;
		below = newBelow;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this,
					Notification.SET, BoardGameLanguagePackage.FIELD__BELOW,
					oldBelow, newBelow);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBelow(Field newBelow) {
		if (newBelow != below) {
			NotificationChain msgs = null;
			if (below != null)
				msgs = ((InternalEObject) below).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__ABOVE, Field.class,
						msgs);
			if (newBelow != null)
				msgs = ((InternalEObject) newBelow).eInverseAdd(this,
						BoardGameLanguagePackage.FIELD__ABOVE, Field.class,
						msgs);
			msgs = basicSetBelow(newBelow, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__BELOW, newBelow, newBelow));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getRow() {
		return row;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRow(int newRow) {
		int oldRow = row;
		row = newRow;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__ROW, oldRow, row));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getColumn() {
		return column;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setColumn(int newColumn) {
		int oldColumn = column;
		column = newColumn;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BoardGameLanguagePackage.FIELD__COLUMN, oldColumn, column));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd,
			int featureID, NotificationChain msgs) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			return basicSetBoard((Board) otherEnd, msgs);
		case BoardGameLanguagePackage.FIELD__FIGURE:
			if (figure != null)
				msgs = ((InternalEObject) figure).eInverseRemove(this,
						BoardGameLanguagePackage.FIGURE__FIELD, Figure.class,
						msgs);
			return basicSetFigure((Figure) otherEnd, msgs);
		case BoardGameLanguagePackage.FIELD__RIGHT:
			if (right != null)
				msgs = ((InternalEObject) right)
						.eInverseRemove(this,
								BoardGameLanguagePackage.FIELD__LEFT,
								Field.class, msgs);
			return basicSetRight((Field) otherEnd, msgs);
		case BoardGameLanguagePackage.FIELD__LEFT:
			if (left != null)
				msgs = ((InternalEObject) left).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__RIGHT, Field.class,
						msgs);
			return basicSetLeft((Field) otherEnd, msgs);
		case BoardGameLanguagePackage.FIELD__ABOVE:
			if (above != null)
				msgs = ((InternalEObject) above).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__BELOW, Field.class,
						msgs);
			return basicSetAbove((Field) otherEnd, msgs);
		case BoardGameLanguagePackage.FIELD__BELOW:
			if (below != null)
				msgs = ((InternalEObject) below).eInverseRemove(this,
						BoardGameLanguagePackage.FIELD__ABOVE, Field.class,
						msgs);
			return basicSetBelow((Field) otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd,
			int featureID, NotificationChain msgs) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			return basicSetBoard(null, msgs);
		case BoardGameLanguagePackage.FIELD__FIGURE:
			return basicSetFigure(null, msgs);
		case BoardGameLanguagePackage.FIELD__RIGHT:
			return basicSetRight(null, msgs);
		case BoardGameLanguagePackage.FIELD__LEFT:
			return basicSetLeft(null, msgs);
		case BoardGameLanguagePackage.FIELD__ABOVE:
			return basicSetAbove(null, msgs);
		case BoardGameLanguagePackage.FIELD__BELOW:
			return basicSetBelow(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eBasicRemoveFromContainerFeature(
			NotificationChain msgs) {
		switch (eContainerFeatureID()) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			return eInternalContainer().eInverseRemove(this,
					BoardGameLanguagePackage.BOARD__FIELDS, Board.class, msgs);
		}
		return super.eBasicRemoveFromContainerFeature(msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			return getBoard();
		case BoardGameLanguagePackage.FIELD__FIGURE:
			if (resolve)
				return getFigure();
			return basicGetFigure();
		case BoardGameLanguagePackage.FIELD__RIGHT:
			if (resolve)
				return getRight();
			return basicGetRight();
		case BoardGameLanguagePackage.FIELD__LEFT:
			if (resolve)
				return getLeft();
			return basicGetLeft();
		case BoardGameLanguagePackage.FIELD__ABOVE:
			if (resolve)
				return getAbove();
			return basicGetAbove();
		case BoardGameLanguagePackage.FIELD__BELOW:
			if (resolve)
				return getBelow();
			return basicGetBelow();
		case BoardGameLanguagePackage.FIELD__ROW:
			return getRow();
		case BoardGameLanguagePackage.FIELD__COLUMN:
			return getColumn();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			setBoard((Board) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__FIGURE:
			setFigure((Figure) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__RIGHT:
			setRight((Field) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__LEFT:
			setLeft((Field) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__ABOVE:
			setAbove((Field) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__BELOW:
			setBelow((Field) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__ROW:
			setRow((Integer) newValue);
			return;
		case BoardGameLanguagePackage.FIELD__COLUMN:
			setColumn((Integer) newValue);
			return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			setBoard((Board) null);
			return;
		case BoardGameLanguagePackage.FIELD__FIGURE:
			setFigure((Figure) null);
			return;
		case BoardGameLanguagePackage.FIELD__RIGHT:
			setRight((Field) null);
			return;
		case BoardGameLanguagePackage.FIELD__LEFT:
			setLeft((Field) null);
			return;
		case BoardGameLanguagePackage.FIELD__ABOVE:
			setAbove((Field) null);
			return;
		case BoardGameLanguagePackage.FIELD__BELOW:
			setBelow((Field) null);
			return;
		case BoardGameLanguagePackage.FIELD__ROW:
			setRow(ROW_EDEFAULT);
			return;
		case BoardGameLanguagePackage.FIELD__COLUMN:
			setColumn(COLUMN_EDEFAULT);
			return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
		case BoardGameLanguagePackage.FIELD__BOARD:
			return getBoard() != null;
		case BoardGameLanguagePackage.FIELD__FIGURE:
			return figure != null;
		case BoardGameLanguagePackage.FIELD__RIGHT:
			return right != null;
		case BoardGameLanguagePackage.FIELD__LEFT:
			return left != null;
		case BoardGameLanguagePackage.FIELD__ABOVE:
			return above != null;
		case BoardGameLanguagePackage.FIELD__BELOW:
			return below != null;
		case BoardGameLanguagePackage.FIELD__ROW:
			return row != ROW_EDEFAULT;
		case BoardGameLanguagePackage.FIELD__COLUMN:
			return column != COLUMN_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy())
			return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (row: ");
		result.append(row);
		result.append(", column: ");
		result.append(column);
		result.append(')');
		return result.toString();
	}

} //FieldImpl
